package com.fg.pro.model.sys.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fg.pro.model.config.ValidationGroups;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.io.Serializable;

/**
 * 角色(SysRole)表实体类
 *
 * @author makejava
 * @since 2025-07-17 10:10:47
 */
@SuppressWarnings("serial")
@Data
public class SysRole extends Model<SysRole> {
    //主键id
    private Long id;
    //角色名称
    @NotEmpty(message = "角色名称不能为空", groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    @Size(message = "角色名称字符长度大于2，小于20", max = 20, min = 2, groups = {ValidationGroups.Insert.class, ValidationGroups.Update.class})
    private String roleName;
    //角色描述
    private String roleDes;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleDes() {
        return roleDes;
    }

    public void setRoleDes(String roleDes) {
        this.roleDes = roleDes;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    public Serializable pkVal() {
        return this.id;
    }
}

